<?php
if (!defined('CMS_SYSTEM')) die('Stop!!!');
ob_start();
global $keywords_site, $header_page_keyword, $home, $Default_Temp, $page_title, $page_title2, $module_title, $sitename, $siteurl, $pagetitle, $module_name,$AdTimeout, $load_hf;
$page_title = strip_tags($page_title,"");
if($home == 1) $module_title = ""._HOMEPAGE."";
include_once(RPATH."templates/$Default_Temp/index.php");
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
echo "<html>";
echo "<head>";
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset="._CHARSET."\">";
echo "<meta http-equiv=\"expires\" content=\"0\">";
$genhour = gmdate("H");
if (intval($genhour) != "" && intval($genhour) != 0) $genhour = $genhour - 1;
@header("Last-Modified: ".gmdate("D, d M Y ".intval($genhour).":i:s")." GMT");
@header("Content-Type: text/html; charset="._CHARSET."");
echo "<meta name=\"resource-type\" content=\"document\">";
echo "<meta name=\"distribution\" content=\"global\">";
echo "<meta name=\"author\" content=\"$sitename\">";
echo "<meta name=\"copyright\" content=\"Copyright (c) ".gmdate("Y")." by $sitename\">";
if (isset($keywords_site)) {
	$key_words = strip_tags($keywords_site);
}
if (isset($header_page_keyword)) {
	$keywords = strip_tags($header_page_keyword);
	$keywords = trim(ereg_replace('("|\?|!|:|\.|\(|\)|;|\\\\)+', ' ', $keywords));
	$keywords = ereg_replace('( |'.CHR(10).'|'.CHR(13).')+', ',', $keywords);
	$keywords = substr($keywords, 0, 1600);
	$keywords = array_unique(explode(",", $keywords));
	for($i=0; $i < count($keywords)-1; $i++) {
		if(isset($keywords[$i]) && strlen($keywords[$i]) > 3) { $key_words_arr[] = $keywords[$i]; }
	}
	$key_words .= ", ".@implode(", ",$key_words_arr);
} else {
	$keywords="";
}
echo "<meta name=\"keywords\" content=\"$key_words\">";
if ($page_title == "") {
	echo "<meta name=\"description\" content=\"".strip_tags($sitename)."\">";
}
else {
	echo "<meta name=\"description\" content=\"$page_title\">";
}
echo "<meta name=\"robots\" content=\"index, follow\">";
echo "<meta name=\"revisit-after\" content=\"1 days\">";
echo "<meta name=\"rating\" content=\"general\">";
echo "<title>$sitename";
if($page_title!="") { echo " :: $page_title"; }
echo "</title>";
echo "<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\" />";

echo "<link rel=\"StyleSheet\" href=\"templates/".$Default_Temp."/css/style.css\" type=\"text/css\">";

echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/jquery.js\" charset=\"utf-8\"></script>";
echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/lazyload.js\" charset=\"utf-8\"></script>";
echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/cufon.js\" charset=\"utf-8\"></script>";
echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/aurora.font.js\" charset=\"utf-8\"></script>";
echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/menu.js\" charset=\"utf-8\"></script>";
/*	
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="css/ie6.css" /><![endif]-->
	<!--[if IE 7]><link rel="stylesheet" type="text/css" href="css/ie7.css" /><![endif]-->
	<!--[if IE 8]><link rel="stylesheet" type="text/css" href="css/ie8.css" /><![endif]-->
*/

echo "<script type=\"text/javascript\">";
echo "Cufon.replace('.level .root,.title .text,.ul_stats li', {font: 'aurora'});";
echo "</script>";
echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/easing.js\" charset=\"utf-8\"></script>";
echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/mousewheel.js\" charset=\"utf-8\"></script>";
echo "<script type=\"text/javascript\" src=\"templates/".$Default_Temp."/js/slider.js\" charset=\"utf-8\"></script>";

echo "<script type=\"text/javascript\">";
	echo "$(window).load(function(){";
		echo "$(\".slide\").slide({";
		echo "shownavitems:4,";
		echo "scroll:1,";
		echo "mousewheel:true,";
		echo "circular:true,";
		echo "start:2,";
		echo "autospeed:$AdTimeout";
	echo"});";
	echo"var map = new mapcompany({id : \"mapcompany\",";
               echo" height: 400,";
                echo"width: 670,";
                echo"startX: 200,";
                echo"startY: 200,";
                echo"cssClass: \"mapcompany\"";
	echo"});";
echo "});";
echo "function frmSubmit(){";
	echo "if (document.frmSearch.keyword.value.length<3 || document.frmSearch.keyword.value == \""._VIEW_SERACH_DATA."\")";
		echo "{";
			echo "alert(\""._KEYWORD_LENGH."\");"; 
			echo "document.frmSearch.keyword.focus();";
			echo "return false;";
		echo "}";
		echo "document.frmSearch.submit();";
		echo "return;";
echo "}";
echo "function webLink(obj) {";
			echo "if (obj.value != '')";
				echo "window.open(obj.value);";
echo "}";
echo "function equalHeight(product) {";
			echo "minheight = 0;";
			echo "product.each(function() {";
				echo "thisheight = $(this).height();";
				echo "if(thisheight > minheight) {";
					echo "minheight = thisheight;";
				echo "}";
			echo "});";
			echo "product.css(\"min-height\",minheight);";
		echo "}";
		echo "$(function() {";
			echo "$(\".product img\").lazyload({";
				echo "placeholder : \"{res file=templates/".$Default_Temp."/images/white.gif}\",";      
				echo "effect      : \"fadeIn\"";
			echo "});";
			echo "equalHeight($(\".product\"));";
		echo "});";
echo "</script>";
echo "</head>";
	echo "<body>";
		echo "<div id=\"container\">";
$nohf = 1;
ob_end_flush();
?>